package ciyuan.Item.SkillBook;

import ciyuan.Effect.Effects;
import ciyuan.Item.ItemGroups;
import ciyuan.Item.TypeInterface.SkillBookType;
import ciyuan.Player.Skill.SkillUtils;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.potion.EffectInstance;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;

/**
 * @author 150149
 */
public class FullConcentration extends SkillBookType {

    private static final String CastTime = ",FullConcentration";

    public FullConcentration() {
        super(new Properties().tab(ItemGroups.SkillBook));
    }

    @Override
    public void keyDown(PlayerEntity playerEntity) {
        SkillUtils.setSkillColdInterval(playerEntity, this, 40 * 1000);
        playerEntity.addEffect(new EffectInstance(Effects.full_concentration, 200, 0));
        SkillUtils.saveSkillCastTime(playerEntity, this);
    }

    @Override
    public String getSkillCastName() {
        return "FullConcentration";
    }

    @Override
    public ITextComponent getSkillDescription() {
        return new TranslationTextComponent("ciyuan.skill.desc.24");
    }

    @Override
    public ITextComponent getSkillName() {
        return new TranslationTextComponent("ciyuan.skill.name.24");
    }
}
